package com.neusoft.ysu.npms.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.neusoft.ysu.npms.mapper.MeasureMapper;
import com.neusoft.ysu.npms.pojo.Measure;
import com.neusoft.ysu.npms.pojo.Result;
import com.neusoft.ysu.npms.service.IMeasureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 作者：刘金秋
 * @since 2024-06-18
 */
@Service
public class MeasureServiceImpl extends ServiceImpl<MeasureMapper, Measure> implements IMeasureService {
    @Autowired
    MeasureMapper measureMapper;
    @Override
    public Result deleteByMeasureId(Integer mesureId) {
        return new Result<>(0, "", measureMapper.deleteByMeasureId(mesureId));
    }
    //    @Override
//    public  Result updateByMeasureId(Integer measureId){
//        return  new Result<>(0,"",measureMapper.updateByMeasureId(measureId));
//    }
    @Override
    public  Result updateByMeasureId(Measure measure){
        return  new Result<>(0,"",measureMapper.updateByMeasureId(measure));
    }
    @Override
    public Result selectAll(){
        return new Result<>(0,"",measureMapper.selectAll());
    }
    @Override
    public Result findById(Measure measure){
        return new Result<>(0,"",measureMapper.findById(measure));
    }
}
